home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Hardware / Mac OS USB DDK / Mac OS USB DDK 1.4.1 / Examples / USBModem / ShimSerialHAL.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-25  |  1.7 KB  |  64 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        ShimSerialHAL.h
  3.  
  4.     Contains:    Definitions for the Modem Serial Driver
  5.  
  6.     Version:    xxx put version here xxx
  7.  
  8.     Written by:    
  9.                 
  10.     Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  11.  
  12.     File Ownership:
  13.  
  14.         DRI:                xxx put dri here xxx
  15.  
  16.         Other Contact:        xxx put other contact here xxx
  17.  
  18.         Technology:            USB
  19.  
  20. */
  21.  
  22. #ifndef    _SHIMSERIALHAL_
  23. #define    _SHIMSERIALHAL_
  24.  
  25. //    masks for getting & setting serial config info
  26.  
  27. #define kSerConfigBaudMask            0x03FF
  28. #define kSerConfigLenMask            0x0C00
  29. #define kSerConfigParityMask        0x3000
  30. #define kSerConfigStopMask            0xC000
  31.  
  32. #define kpciGetDCD                    256
  33.  
  34. /********************************************************************************************/
  35. //
  36. //    Prototypes
  37. //
  38. /********************************************************************************************/
  39.  
  40. OSErr     SerHAL_Entry(UInt16 HdwSelector, ParmBlkPtr pb, UInt32 RefCon);
  41.  
  42. OSErr    HAL_SetConfiguration(UInt16 config);
  43. OSErr    HAL_SetInputBuffer(Ptr newBuf, UInt16 bufLen);
  44. void     HAL_SetFlowControl(SerShk *shkNew, UInt16 csCode);
  45. void    HAL_SendXOn(Boolean always);
  46. void    HAL_SendXOff(Boolean always);
  47. void     HAL_SetXOffFlag(Boolean state);
  48. void    HAL_GetStatus(SerStaRec *statRec);
  49. UInt32    HAL_GetBuffer(void);
  50. UInt16    HAL_SetDTERate(UInt32 baudRate);
  51. void    HAL_SetParity(Boolean alt, char peChar, char peAltChar);
  52. OSErr     HAL_FillReadRequest(IOParam *pb);
  53. void     HAL_EnableSerialDevice(void);
  54. void     HAL_DisableSerialDevice(void);
  55. void     HAL_InputFlowControl(void);
  56. void     HAL_EnableInput(Boolean enable);
  57. void     HAL_EnableOutput(void);
  58. OSErr    HAL_DoOpenSession(void);
  59. OSErr    HAL_DoCloseSession(void);
  60. OSErr     HAL_ControlExtend(ParmBlkPtr pb);
  61. OSErr     HAL_StatusExtend(ParmBlkPtr pb);
  62. void     HAL_ShimInput(UInt8 *buf, UInt32 count);
  63.  
  64. #endif